#include <iostream>
#include <cmath>
using namespace std;
int main ()
{
	/*erffsfsa*/
	int a,b,c;
	double m,n,k;
	cout<<"enter the coefficient of the equation"<<endl;
	cin>>a>>b>>c;
	cout<<"enter the range of the root"<<endl;
	cin>>m>>n;
	if((a*pow(m,2)+b*m+c)*(a*pow(n,2)+b*n+c)<0)
	{
		cout<<"this program can't use"<<endl;
	}
	else{
		while((fabs(m-n)>1e-8))
			{		
				k=(m+n)/2;
				if((a*pow(m,2)+b*m+c)*(a*pow(k,2)+b*k+c)<0) 
				{   
				n=k;
				}
				else
                  if((a*pow(n,2)+b*n+c)*(a*pow(k,2)+b*k+c)<0)
					{
					m=k;
					}
        	}
		}
		cout<<k<<m<<n<<a*k*k+b*k+c<<endl;

		cin>>k;
		return 0;
	}
